/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Forms;

import Constants.*;
import Main.*;
import javax.microedition.lcdui.*;

public class QueryResultForm extends Form implements CommandListener {

    private Command _BackCommand;
    private StringItem _ResultOutputStringItem = new StringItem("", "");

    public QueryResultForm(String info)
    {
        super(Constant.QueryResultForm_Title);
        
        _ResultOutputStringItem.setText(info);
        append(_ResultOutputStringItem);
        
        _BackCommand = new Command(Constant.QueryResultForm_BackCommandText, Command.BACK, 1);

        addCommand(_BackCommand);
        setCommandListener(this);
    }

    public void commandAction(Command c, Displayable s) {
        //返回上一个屏幕
        if(c == _BackCommand)
        {
            Program.GetDisplay().setCurrent(MainForm.GetInstance());
        }
    }
}

